#ifndef MYAMG_SOLVER_CUH
#define MYAMG_SOLVER_CUH
#include <Solver/SolverKernels.cuh>

namespace myamg {
    template<typename Integer, typename Real, typename Allocator, typename Derived>
    class Solver {
        public:
        using matrixType = CSRMatrix<Integer, Real, Allocator>;
        using vectorType = Vector<Real, Allocator>;
        using integerType = Integer;
        using realType = Real;
        using allocatorType = Allocator;

        template<typename Precond>
        void apply(const matrixType &A, Precond &P, const vectorType &b, vectorType &x, int &iter,
                   double &relres) {
            static_cast<Derived *>(this)->applyImpl(A, P, b, x, iter, relres);
        }
    };
}

#endif //MYAMG_SOLVER_CUH
